/*
 * DataPropertyPanel.java
 *
 * Created on 13. Juni 2008, 20:22
 */

package twi.view.manipulation;

import java.awt.GridBagConstraints;
import java.util.ArrayList;

/**
 *
 * @author  Soeren
 */
public class DataPropertyPanel extends javax.swing.JPanel {
	private ArrayList<DatatypeSingleProperty> propPanels;

	/** Creates new form DatatypePropertyFrame 
     * @param propPanelList */
    public DataPropertyPanel(ArrayList<DatatypeSingleProperty> propPanelList) {
        initComponents();
        this.propPanels = propPanelList;
        setup();
        validate();
    }

    private void setup() {
		GridBagConstraints gc = new GridBagConstraints();
		gc.fill = GridBagConstraints.BOTH;
		gc.gridx = 0;gc.gridy = 0;
		gc.gridheight = 1; gc.gridwidth = 1;
		for (int i = 0; i < propPanels.size(); i++){
			add(propPanels.get(i), gc);
			gc.gridy++;
		}
	}

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        setName("Form"); // NOI18N
        setLayout(new java.awt.GridBagLayout());
    }// </editor-fold>//GEN-END:initComponents


    public void commit(String individualName) {
		for (int i = 0; i < this.propPanels.size(); i++){
			this.propPanels.get(i).commit(individualName);
		}
	}
    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables

	public void updateModfications() {
		// TODO Auto-generated method stub
		
	}

}
